Use HYPERVISOR_set_timer_op and HYPERVISOR_block instead of busy-yielding.
pushl $IPL_NONE
call _C_LABEL(Xspllower)
addl $4,%esp
+ jmp idle_start
4:
call _C_LABEL(uvm_pageidlezero)
CLI(%eax)
movl _C_LABEL(uvm)+UVM_PAGE_IDLE_ZERO,%ecx
testl %ecx,%ecx
jnz idle_zero
+ call _C_LABEL(idle_block)
+ cmpl $0,_C_LABEL(sched_whichqs)
+ jnz idle_exit
STIC(%eax)
jz 4f
call _C_LABEL(stipending)
void xenprivcmd_init(void);
void xenvfr_init(void);
+void idle_block(void);
+
#ifdef XENDEBUG
void printk(const char *, ...);
void vprintk(const char *, va_list);
setstatclockrate(int arg)
{
}
+
+void
+idle_block(void)
+{
+
+ /*
+ * We set the timer to when we expect the next timer
+ * interrupt. We could set the timer to later if we could
+ * easily find out when we will have more work (callouts) to
+ * process from hardclock.
+ */
+ if (HYPERVISOR_set_timer_op(processed_system_time + NS_PER_TICK) == 0)
+ HYPERVISOR_block();
+}